import DragHandle from '@tiptap-pro/extension-drag-handle-react';
import { GripVertical } from 'lucide-react';
import { useEditorStore } from '@/store/useEditorZustand';

const DragHandleButton = () => {
  const { editor } = useEditorStore();
  return editor ? (
    <DragHandle editor={editor} pluginKey="customDragHandle">
      <GripVertical className="mt-1 size-4 cursor-grab" />
    </DragHandle>
  ) : null;
};

export default DragHandleButton;
